package great.project.bean.xml;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {

    public static void main(String[] args) {

        /*
            使用xml配置一个spring bean
         */

        ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("classpath:spring-xml.xml");
        final ZhangSan zhangSan = classPathXmlApplicationContext.getBean("zhangSan" , ZhangSan.class);
        final ZhangSan zhangSan1 = classPathXmlApplicationContext.getBean("zhangSan" , ZhangSan.class);
        System.out.println(zhangSan.hashCode());
        System.out.println(zhangSan1.hashCode());

    }

}
